package com.wei.service.impl;

import com.wei.pojo.Order;
import com.wei.service.OrderService;
import com.wei.service.ProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;

@Service
public class OrderServiceImpl implements OrderService {

    @Resource
    private ProductService productService;

    @Override
    public Order selectOrderById(Integer id) {
        return new Order(id, "order-001", "中国-feign", 2727D,
                Collections.singletonList(productService.selectProductById(1)));
    }

}
